package org.lemon.transport.context.service.queue.setting;

import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Setter
@Component
public class QueueTransportApiSettings {

    private String requestsTopic = "transport.api.requests";

    private String responsesTopic = "transport.api.responses";

    private int maxPendingRequests = 10000;

    private int maxRequestsTimeout = 10000;

    @Value("${queue.transport_api.max_callback_threads}")
    private int maxCallbackThreads;

    private long requestPollInterval = 25;

    private long responsePollInterval = 25;

    public String getRequestsTopic() {
        return requestsTopic;
    }

    public String getResponsesTopic() {
        return responsesTopic;
    }

    public int getMaxPendingRequests() {
        return maxPendingRequests;
    }

    public int getMaxRequestsTimeout() {
        return maxRequestsTimeout;
    }

    public int getMaxCallbackThreads() {
        return maxCallbackThreads;
    }

    public long getRequestPollInterval() {
        return requestPollInterval;
    }

    public long getResponsePollInterval() {
        return responsePollInterval;
    }
}
